<?php
/**
 * Created by PhpStorm.
 * User: haodian
 * Date: 2018/7/25
 * Time: 14:57
 */

namespace App\Http\Controllers\Index;


use App\Base\BaseFunc;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;

class ChangController extends Controller
{
    public function gameGLList()
    {
        $data['gameGLList'] = DB::table('game_gl')
            ->where('game_gl_floor',session('ad_floor'))
            ->orderby('game_gl_id','desc')
            ->paginate(10);
        return view('/index.chang.gameGLList',$data);
    }

    public function gameGLInfo($id)
    {
        $data['gameGLInfo']  = DB::table('game_gl')
            ->where('game_gl_id',$id)
            ->first();
        return view('/index.chang.gameGLInfo',$data);
    }

    public function gameMPList()
    {
        $data['gameMPList'] = DB::table('game_mp')
            ->where('game_mp_floor',session('ad_floor'))
            ->orderby('game_mp_id','desc')
            ->paginate(10);
        return view('/index.chang.gameMPList',$data);
    }

    public function gameMPInfo($id)
    {
        $data['gameMPInfo']  = DB::table('game_mp')
            ->where('game_mp_id',$id)
            ->first();
        return view('/index.chang.gameMPInfo',$data);
    }

    public function gameJNList()
    {
        $data['gameJNList'] = DB::table('game_jn')
            ->where('game_jn_floor',session('ad_floor'))
            ->orderby('game_jn_id','desc')
            ->paginate(10);
        return view('/index.chang.gameJNList',$data);
    }

    public function gameJNInfo($id)
    {
        $data['gameJNInfo']  = DB::table('game_jn')
            ->where('game_jn_id',$id)
            ->first();
        return view('/index.chang.gameJNInfo',$data);
    }
}